
*******************************************************************************
*																			  *
* Who do you trust? 														  *					
* Institutions that Constrain Leaders Help People Prevent Disaster			  *
*																			  *
* Talbot M. Andrews, Andrew W. Delton, & Reuben Kline						  *
*																			  *
* Replication file, prepared January 2022									  *
* email talbot.andrews@uconn.edu with any questions							  *
*																			  *
*******************************************************************************

* Install packages and set scheme make figures
ssc install blindschemes
net install grc1leg,from( http://www.stata.com/users/vwiggins/) 
ssc install estout
set scheme plotplain

* Set working directory to folder

 ** -- Your working directory here! -- **

********************************************************************************
* Main text analysis
********************************************************************************


*** Figure 1 ***

	* Proportion making each type of contribution in each condition
	use follower_combined.dta, clear
	graph bar less_symmetric symmetric more_symmetric, over(long_message) over(keep_title) ///
		bar(1, color(black)) bar(2, color(gs7) lcolor(black)) bar(3, color(white) lcolor(black)) ///
		legend(position(6) subtitle("Contribution Type") label(1 "Less Than Fair Share")  ///
		label(2 "Fair Share") label(3 "More than Fair Share") col(3) region(lpattern(solid) lcolor(black))) ///
		b1title("Message") title("") ytitle("Proportion of Contributions") 
	graph export figure_1.png, height(1500) replace

	
*** Figure 2 ***

	* Proportion who believe the leader in each condition
	
	* Panel 1: Lab Results
	use follower_combined.dta, clear
		replace believe = . if lab == 0
		collapse (mean) meansym= believe (sd) sdsym=believe (count) n=believe, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(off) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(Lab)", size(medlarge)) ytitle("Proportion Who Trust Leader", size(medlarge)) ///
			saving(believe_lab, replace)
	
	* Panel 2: MTurk Results
	use follower_combined.dta, clear
		replace believe = . if lab == 1
		collapse (mean) meansym= believe (sd) sdsym=believe (count) n=believe, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(order(1 "Control Condition" 2 "Inefficiency Condition") size(medlarge) ///
			pos(2) ring(0)) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(MTurk)", size(medlarge)) ytitle("Proportion Who Trust Leader", size(medlarge)) ///
			saving(believe_turk, replace)
	
	* Combine panels and export graph
	gr combine believe_lab.gph believe_turk.gph, xsize(10) ysize(6)
	graph export figure_2.png, height(1500) replace
	
	
*** Figure 3 ***
	
	* Proportion who contribute less than their fair share
	
	* Panel 1: Lab Results
	use follower_combined.dta, clear
		replace less_symmetric = . if lab == 0
		collapse (mean) meansym= less_symmetric (sd) sdsym=less_symmetric (count) n=less_symmetric, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)


		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(off) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(Lab)", size(medlarge)) ///
			ytitle("Proportion Contributing" "Less Than Fair Share", size(medlarge)) ///
			saving(less_lab, replace)

	* Panel 2: Mturk Results
	use follower_combined.dta, clear
		replace less_symmetric = . if lab == 1
		collapse (mean) meansym= less_symmetric (sd) sdsym=less_symmetric (count) n=less_symmetric, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)


		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(order(1 "Control Condition" 2 "Inefficiency Condition") size(medlarge) ///
			pos(2) ring(0)) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(MTurk)", size(medlarge)) ///
			ytitle("Proportion Contributing" "Less Than Fair Share", size(medlarge)) ///
			saving(less_turk, replace)
			
	* Combine panels and export graph
	gr combine less_lab.gph less_turk.gph, xsize(10) ysize(6)
	graph export figure_3.png, height(1500) replace
	
	
*** Figure 4 ***

	* Trust and contributions by comprehension
	use follower_combined.dta, clear
	
	* Panel 1: Trust for high comprehension
		reg believe i.message##i.keep##i.total_comp lab, robust
		margins, at(message = (1(1)5)) over(keep) subpop(if total_comp ==3)
		marginsplot, recast(scatter) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
			plot2opts(color(gs9) msymbol(square)) ci2opts(color(gs9)) ///
			legend(off) ylabel(0(0.2)1, labsize(med)) xtitle("Message") ///
			xlabel(1 "80" 2 "160" 3 "240" 4 "320" 5 "400", labsize(med)) ///
			title("All Questions Correct", size(medlarge)) ///
			ytitle("Trust Leader", size(med)) ///
			saving(believe_high, replace)
		
	* Panel 2: Trust for low comprehension
		reg believe i.message##i.keep##i.total_comp lab, robust
		margins, at(message = (1(1)5)) over(keep) subpop(if total_comp ==1)
		marginsplot, recast(scatter) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
			plot2opts(color(gs9) msymbol(square)) ci2opts(color(gs9)) ///
			legend(off) ylabel(0(0.2)1, labsize(med)) xtitle("Message") ///
			xlabel(1 "80" 2 "160" 3 "240" 4 "320" 5 "400", labsize(med)) ///
			title("One Question Correct", size(medlarge)) ///
			ytitle("Trust Leader", size(med))  ///
			saving(believe_low, replace)
			
	* Panel 3: Under-contribution for high comprehension
		reg less_symmetric i.message##i.keep##i.total_comp lab, robust
		margins, at(message = (1(1)5)) over(keep) subpop(if total_comp ==3)
		marginsplot, recast(scatter) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
			plot2opts(color(gs9) msymbol(square)) ci2opts(color(gs9)) ///
			legend(off) ylabel(0(0.2)1, labsize(med)) xtitle("Message") ///
			xlabel(1 "80" 2 "160" 3 "240" 4 "320" 5 "400", labsize(med)) ///
			title("All Questions Correct", size(medlarge)) ///
			ytitle("Under-Contribute", size(med))  ///
			saving(less_high, replace)
			
	* Panel 4: Under-contribution for low comprehension
		reg less_symmetric i.message##i.keep##i.total_comp lab, robust
		margins, at(message = (1(1)5)) over(keep) subpop(if total_comp ==1)
		marginsplot, recast(scatter) ///
			plot1opts(color(black) msymbol(circle)) ci1opts(color(black)) ///
			plot2opts(color(gs9) msymbol(square)) ci2opts(color(gs9)) ///
			ylabel(0(0.2)1, labsize(med)) xtitle("Message") ///
			xlabel(1 "80" 2 "160" 3 "240" 4 "320" 5 "400", labsize(med)) ///
			title("One Question Correct", size(medlarge)) ///
			legend(order(3 "Control Condition" 4 "Inefficiency Condition") col(2) size(med) ///
			region(lwidth(.2) lcolor(black) lpattern(solid))) saving(less_low, replace)
			
	* Combine panels and export figure
	grc1leg2 believe_high.gph believe_low.gph less_high.gph less_low.gph, ///
		col(2) legendfrom(less_low.gph) pos(6)
	graph export figure_4.png, height(1500) replace

	
*** Figure 5 ***

	* Distance between leader message and threshold cost

	* Panel 1: Lab results
	use leader_combined.dta, clear
		collapse (mean) meansym= lab_long_mess_dis (sd) sdsym=lab_long_mess_dis (count) n=lab_long_mess_dis, ///
			by(keep real_threshold)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(real_threshold == 1 & keep == 0)
		replace sym_message = 2 if(real_threshold == 1 & keep == 1)
		replace sym_message = 4 if(real_threshold == 2 & keep == 0)
		replace sym_message = 5 if(real_threshold == 2 & keep == 1)
		replace sym_message = 7 if(real_threshold == 3 & keep == 0)
		replace sym_message = 8 if(real_threshold == 3 & keep == 1)
		replace sym_message = 10 if(real_threshold == 4 & keep == 0)
		replace sym_message = 11 if(real_threshold == 4 & keep == 1)
		replace sym_message = 13 if(real_threshold == 5 & keep == 0)
		replace sym_message = 14 if(real_threshold == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ///
			legend(off) ylabel(-150(50)250, labsize(med)) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) /// 
			xtitle("Real Cost" "(Lab)", size(medlarge)) yline(0) ///
			ytitle("Distance Between Message" "and Real Cost", size(medlarge)) ///
			saving(lab_leader, replace)
			
	* Panel 2: MTurk Results
	use leader_combined.dta, clear
		collapse (mean) meansym= turk_long_mess_dis (sd) sdsym=turk_long_mess_dis ///
			(count) n=turk_long_mess_dis, by(keep real_threshold)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(real_threshold == 1 & keep == 0)
		replace sym_message = 2 if(real_threshold == 1 & keep == 1)
		replace sym_message = 4 if(real_threshold == 2 & keep == 0)
		replace sym_message = 5 if(real_threshold == 2 & keep == 1)
		replace sym_message = 7 if(real_threshold == 3 & keep == 0)
		replace sym_message = 8 if(real_threshold == 3 & keep == 1)
		replace sym_message = 10 if(real_threshold == 4 & keep == 0)
		replace sym_message = 11 if(real_threshold == 4 & keep == 1)
		replace sym_message = 13 if(real_threshold == 5 & keep == 0)
		replace sym_message = 14 if(real_threshold == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ///
			legend(order(1 "Control Condition" 2 "Inefficiency Condition") size(med) ///
			pos(2) ring(0)) ylabel(-150(50)250, labsize(med)) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) /// 
			xtitle("Real Cost" "(MTurk)", size(medlarge)) yline(0) ///
			ytitle("Distance Between Message" "and Real Cost", size(medlarge)) ///
			saving(turk_leader, replace)
	
	* Combine panels and export figure
	grc1leg2 lab_leader.gph turk_leader.gph, legendfrom(turk_leader.gph) ring(0) pos(2) 
	graph export figure_5.png, height(1500) replace
	
	
*** Table 1 ***
use follower_combined.dta, clear

	* Recode threshold to 1-5
		gen real_t2 = 1 if(real_t == 80)
		replace real_t2 = 2 if(real_t == 160)
		replace real_t2 = 3 if(real_t == 240)
		replace real_t2 = 4 if(real_t == 320)
		replace real_t2 = 5 if(real_t == 400)

		replace real_m = 1 if(real_m == 80)
		replace real_m = 2 if(real_m == 160)
		replace real_m = 3 if(real_m == 240)
		replace real_m = 4 if(real_m == 320)
		replace real_m = 5 if(real_m == 400)
	
	* Run LPM
	eststo clear
	eststo: reg winner real_t01 real_m01 keep lab, robust cluster(ID)

	* Export table to .rtf
	esttab using table_1.rtf, replace  label ///
		mtitles( "Group Success") ///
		coeflabels(real_t01 "Cost" real_m01 "Message" ///
		keep "Inefficiency Condition" lab "Sample") se 
	eststo clear

********************************************************************************
* Appendix C: Additional Analyses
********************************************************************************

*** Figure C1 ***

	* Proportion contributing more than their fair share
	
	* Panel 1: Lab
	use follower_combined.dta, clear
		gen short_message = message if(message < 5)

		replace more_symmetric = . if lab == 0
		collapse (mean) meansym= more_symmetric (sd) sdsym=more_symmetric (count) n=more_symmetric, by(keep short_message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(short_message == 1 & keep == 0)
		replace sym_message = 2 if(short_message == 1 & keep == 1)
		replace sym_message = 4 if(short_message == 2 & keep == 0)
		replace sym_message = 5 if(short_message == 2 & keep == 1)
		replace sym_message = 7 if(short_message == 3 & keep == 0)
		replace sym_message = 8 if(short_message == 3 & keep == 1)
		replace sym_message = 10 if(short_message == 4 & keep == 0)
		replace sym_message = 11 if(short_message == 4 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(off) ///
			xlabel(1.5 "80" 4.5 "160" 7.5 "240" 10.5 "320", labsize(med)) ///
			xtitle("Message" "(Lab)", size(medlarge)) ///
			ytitle("Proportion Contributing" "More Than Fair Share", size(medlarge)) ///
			saving(more_lab, replace)

	* Panel 2: MTurk
	use follower_combined.dta, clear
		gen short_message = message if(message < 5)

		replace more_symmetric = . if lab == 1
		collapse (mean) meansym= more_symmetric (sd) sdsym=more_symmetric (count) n=more_symmetric, by(keep short_message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(short_message == 1 & keep == 0)
		replace sym_message = 2 if(short_message == 1 & keep == 1)
		replace sym_message = 4 if(short_message == 2 & keep == 0)
		replace sym_message = 5 if(short_message == 2 & keep == 1)
		replace sym_message = 7 if(short_message == 3 & keep == 0)
		replace sym_message = 8 if(short_message == 3 & keep == 1)
		replace sym_message = 10 if(short_message == 4 & keep == 0)
		replace sym_message = 11 if(short_message == 4 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(order(1 "Control Condition" 2 "Inefficiency Condition") size(medlarge) ///
			pos(2) ring(0)) ///
			xlabel(1.5 "80" 4.5 "160" 7.5 "240" 10.5 "320", labsize(med)) ///
			xtitle("Message" "(MTurk)", size(medlarge)) ///
			ytitle("Proportion Contributing" "More Than Fair Share", size(medlarge)) ///
			saving(more_turk, replace)

	* Combine panels and export figure
	grc1leg2 more_lab.gph more_turk.gph, legendfrom(more_turk.gph) ring(0) pos(2) xsize(10) ysize(6)
	graph export figure_c1.png, height(1500) replace

	
*** Figure C2 ***

	* Proportion contributing their fair share
	
	* Panel 1: Lab
	use follower_combined.dta, clear
		replace symmetric = . if lab == 0
		collapse (mean) meansym= symmetric (sd) sdsym=symmetric (count) n=symmetric, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(off) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(Lab)", size(medlarge)) ytitle("Proportion Contributing Fair Share", size(medlarge))  ///
			saving(sym_lab, replace)

	* Panel 2: MTurk
	use follower_combined.dta, clear
		replace symmetric = . if lab == 1
		collapse (mean) meansym= symmetric (sd) sdsym=symmetric (count) n=symmetric, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.2)0.8, labsize(med)) ///
			legend(order(1 "Control Condition" 2 "Inefficiency Condition") size(medlarge) ///
			pos(2) ring(0)) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(MTurk)", size(medlarge)) ytitle("Proportion Contributing Fair Share", size(medlarge)) ///
			saving(sym_turk, replace)

	* Combine panels and export figure
	grc1leg2 sym_lab.gph sym_turk.gph, legendfrom(sym_turk.gph) ring(0) pos(2) xsize(10) ysize(6)
	graph export figure_c2.png, height(1500) replace
	
	
*** Figure C3 ***

	* Proportion of fair share contribution contributed
	
	* Panel 1: Lab
	use follower_combined.dta, clear
		
		replace prop_symmetric = . if lab == 0
		collapse (mean) meansym= prop_symmetric (sd) sdsym=prop_symmetric (count) n=prop_symmetric, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.5)2, labsize(med)) ///
			legend(off) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(Lab)", size(medlarge)) ytitle("Proportion of Symmetric Contribution", size(medlarge)) ///
			saving(prop_lab, replace)
	
	* Panel 2: MTurk
	use follower_combined.dta, clear
	
		replace prop_symmetric = . if lab == 1
		collapse (mean) meansym= prop_symmetric (sd) sdsym=prop_symmetric (count) n=prop_symmetric, by(keep message)
		generate hisym = meansym + invttail(n-1,0.025)*(sdsym / sqrt(n))
		generate lowsym = meansym - invttail(n-1,0.025)*(sdsym / sqrt(n))
			
		gen sym_message = 1 if(message == 1 & keep == 0)
		replace sym_message = 2 if(message == 1 & keep == 1)
		replace sym_message = 4 if(message == 2 & keep == 0)
		replace sym_message = 5 if(message == 2 & keep == 1)
		replace sym_message = 7 if(message == 3 & keep == 0)
		replace sym_message = 8 if(message == 3 & keep == 1)
		replace sym_message = 10 if(message == 4 & keep == 0)
		replace sym_message = 11 if(message == 4 & keep == 1)
		replace sym_message = 13 if(message == 5 & keep == 0)
		replace sym_message = 14 if(message == 5 & keep == 1)

		twoway (bar meansym sym_message if keep == 0, color(gs13) lcolor(black)) ///
			(bar meansym sym_message if keep == 1, color(gs3) lcolor(black)) ///
			(rcap hisym lowsym sym_message, color(black)), ylabel(0(0.5)2, labsize(med)) ///
			legend(order(1 "Control Condition" 2 "Inefficiency Condition") size(medlarge) ///
			pos(2) ring(0)) ///
			xlabel(1 "80" 4 "160" 7 "240" 10 "320" 13 "400", labsize(med)) ///
			xtitle("Message" "(MTurk)", size(medlarge)) ytitle("Proportion of Symmetric Contribution", size(medlarge)) ///
			saving(prop_turk, replace)
	
	* Combine panels and export figure
	grc1leg2 prop_lab.gph prop_turk.gph, legendfrom(prop_turk.gph) ring(0) pos(2) xsize(10) ysize(6)
	graph export figure_c3.png, height(1500) replace
	
	
*** Table C1 ***
use follower_combined.dta, clear
	
	* Generate dependent variables
	gen believe_lab = believe if(lab == 1)
	gen believe_turk = believe if(lab == 0)
	gen less_lab = less_symmetric if(lab == 1)
	gen less_turk = less_symmetric if(lab == 0)

	* Run linear probability models
	eststo clear
	eststo: reg believe_lab keep message01 interact01, robust cluster(ID)
	eststo: reg believe_turk keep message01 interact01, robust cluster(ID)
	eststo: reg less_lab keep message01 interact01, robust cluster(ID)
	eststo: reg less_turk keep message01 interact01, robust cluster(ID)
	
	* Export results to .rtf
	esttab using table_c1.rtf, replace  label ///
		mtitles( "Believe Leader (Lab)" "Believe Leader (MTurk)" ///
		"Under-Contribute (Lab)" "Under-Contribute (Mturk)") ///
		coeflabels(keep "Inefficiency Condition" message01 "Message" ///
		interact01 "Condition X Message") se 
	eststo clear

	
*** Table C2 ***
use follower_combined.dta, clear
	
	* Add variable labels for output
	lab def message 1 "80 Tokens" 2 "160 Tokens" 3 "240 Tokens" 4 "320 Tokens" 5 "400 Tokens"
	lab val message message
	
	lab var total_comp "Comprehension"	
	
	lab def keep 0 "Control" 1 "Inefficiency"
	lab val keep keep 
	
	* Run linear probability models
	eststo clear
	eststo: reg believe i.keep##i.message##c.total_comp lab, robust cluster(ID)
	eststo: reg less_symmetric i.keep##i.message##c.total_comp lab, robust cluster(ID)

	* Export results to .rtf
	esttab using table_c2.rtf, replace label interact(" x ") ///
		mtitles("Believe Message" "Under-Contribute") nobase ///
		coeflabels(keep "Inefficiency Condition" message "Message" ///
		total_comp "Correct Answers" lab "Lab") se 
	eststo clear 
	//note: additional labels for each level of interaction between condition, 
		// message, and continuous comprehension variable added by hand
		
		
*** Table C3 ***
use follower_combined.dta, clear

	* Add variable labels for output
	lab def message 1 "80 Tokens" 2 "160 Tokens" 3 "240 Tokens" 4 "320 Tokens" 5 "400 Tokens"
	lab val message message
		
	lab def keep 0 "Control" 1 "Inefficiency"
	lab val keep keep 
	
	lab def lab 0 "MTurk" 1 "Lab"
	lab val lab lab

	* Run linear probability models
	eststo clear
	eststo: reg believe i.message##i.keep##i.lab, robust
	eststo: reg less_symmetric i.message##i.keep##i.lab, robust
	
	* Export results to .rtf
	esttab using table_c3.rtf, replace  label interact(" x ") ///
		mtitles("Believe Message" "Under-Contribute") nobase ///
		coeflabels(keep "Inefficiency Condition" message "Message" ///
		lab "Lab") se 
	eststo clear 
	//note: additional labels for each level of interaction between sample, 
		// message, and condition added by hand
		
		
*** Figure C4 ***
	
	* Effect of condition on trust by sample
	use follower_combined.dta, clear
		reg believe i.message##i.keep##i.lab, robust
		margins, dydx(keep) at(message = (1(1)5)) over(lab)
		marginsplot, recast(scatter) ///
			plot1opts(color(gs3) msymbol(circle)) ci1opts(lcolor(gs3)) ///
			plot2opts(color(forest_green) msymbol(square)) ci2opts(lcolor(forest_green)) ///
			legend(order(3 "MTurk" 4 "Lab") pos(2) ring(0) size(med)) ///
			title("") xtitle("Message") yline(0) ///
			xlabel(1 "80" 2 "160" 3 "240" 4 "320" 5 "400", labsize(med)) ///
			ytitle("Marginal Effect of Condition" "On Trusting Leader") 
	graph export figure_c4.png, height(1500) replace
	
	
*** Figure C5 ***

	* Effect of condition on under-contributing by sample
	use follower_combined.dta, clear
		reg less_symmetric i.message##i.keep##i.lab, robust
		margins, dydx(keep) at(message = (1(1)5)) over(lab)
		marginsplot, recast(scatter) ///
			plot1opts(color(gs3) msymbol(circle)) ci1opts(lcolor(gs3)) ///
			plot2opts(color(forest_green) msymbol(square)) ci2opts(lcolor(forest_green)) ///
			legend(order(3 "MTurk" 4 "Lab") pos(10) ring(0) size(med)) ///
			title("") xtitle("Message") yline(0) ///
			xlabel(1 "80" 2 "160" 3 "240" 4 "320" 5 "400", labsize(med)) ///
			ytitle("Marginal Effect of Condition" "On Under-Contributing") 
	graph export figure_c5.png, height(1500) replace
	
	
*** Figure C6 ***

	* Histogram of comprehension scores (lab)
	use follower_combined.dta, clear
		gen comp_lab = total_comp if(lab == 1)
		hist comp_lab, percent width(0.75) xlabel(0(1)3) xtitle("Correct Answers") title("Lab")
		graph export figure_c6.png, height(1500) replace
	

*** Figure C7 ***

	* Histogram of comprehension scores (mturk)
	use follower_combined.dta, clear
		gen comp_turk = total_comp if(lab == 0)
		hist comp_turk, percent width(0.75) xlabel(0(1)3) xtitle("Correct Answers") title("MTurk")
		graph export figure_c7.png, height(1500) replace
		

*** Table C4 ***
	
	* Times leader sent each signal at each true value of the threshold (control condition)
	use leader_combined.dta, clear
	tab message real_threshold if keep == 0
		// note: results put into table by hand
		
	
*** Table C5 ***
	
	* Times leader sent each signal at each true value of the threshold (inefficiency condition)
	use leader_combined.dta, clear
	tab message real_threshold if keep == 1
		// note: results put into table by hand


*** Table C6 ***

	* Leader messages by condition and threshold
	use leader_combined.dta, clear
	gen threshold01 = (long_t - 80)/320
	gen threshold_keep = threshold01 * keep
	gen long_message_lab = long_message if(lab == 1)
	gen long_message_turk = long_message  if(lab == 0)

	*Models
	eststo clear
	eststo: reg long_message_lab keep threshold01 threshold_keep, cluster(ID)
	eststo: reg long_message_turk keep threshold01 threshold_keep, cluster(ID)

	* Export table to .rtf
	esttab using table_c6.rtf, replace  label ///
		mtitles( "Lab" "Mturk") ///
		coeflabels(keep "Inefficiency Condition" threshold01 "Threshold" ///
		threshold_keep "Condition X Threshold") se 
	eststo clear
	
*** Table C7 ***

	* Demographic characteristics
	use demographic_data.dta, clear
		// note: Results transcribed to table by hand, commands to recover
			// all results included here. 
		
	* Age
	mean Age if lab == 0
	mean Age if lab == 1
	
	* Gender
	tab Gender if lab == 0
	tab Gender if lab == 1
	
	* Race
	tab race if lab == 0
	tab race if lab == 1

	* Education (MTurk only, all lab respondents were college students)
	tab educ if lab == 0
	
	* Partisanship
	tab PartyID if lab == 0
	tab PartyID if lab == 1
	
	*Ideology
	mean idlgy if lab == 0
	mean idlgy if lab == 1
	








	


	


